package cn.edu.swu.infosystem_1;


public class Course {
    private String courseId;
    private String courseName;
    private String teacher;

    // 无参构造方法
    public Course() {}

    // 有参构造方法
    public Course(String courseId, String courseName, String teacher){
        this.courseId = courseId;
        this.courseName = courseName;
        this.teacher = teacher;
    }

    // CourseId、CourseName、teacher的封装，公共的getter和setter方法
    public String getCourseId(){
        return courseId;
    }

    public void setCourseId(String courseId){
        this.courseId = courseId;
    }

    public String getCourseName(){
        return courseName;
    }

    public void setCourseName(String courseName){
        this.courseName = courseName;
    }

    public String getTeacher(){
        return teacher;
    }

    public void setTeacher(String teacher){
        this.teacher = teacher;
    }

    // 打印输出该课程的所有信息
    public void showInfo(){
        System.out.println("Course Name:\t" + this.courseName);
        System.out.println("Course Id:\t\t" + this.courseId);
        System.out.println("teacher:\t\t" + this.teacher);
        System.out.println();
    }

}
